﻿using System;
using System.Configuration;
using System.Text;
using System.Data;
using System.IO;

namespace IPR_StudyMeetingMrgSys.Common
{ 
	public sealed class SysLog
	{

        #region

        public static void WriteToLog(string strLine)
        {
            try
            {  
                    string strFilePath = AppDomain.CurrentDomain.BaseDirectory  + "\\SvrLog\\" + DateTime.Now.ToString("yyyyMMdd");
                    DirectoryInfo dir = new DirectoryInfo(strFilePath);
                    if (!dir.Exists)
                        dir.Create();
                    StreamWriter sw = new StreamWriter(strFilePath + "\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt", true, System.Text.Encoding.Default);
                    sw.WriteLine(strLine);
                    sw.Close(); 
            }
            catch
            {
            }
        }
         
		#endregion
		

	}
}
